<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta name="viewport"name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <title>用户反馈</title>  <link rel="icon" href="/template/pc1/images/wmh_favicon.ico" type="image/x-icon" />
    <link href="/template/default/css/style_ky.css" rel="stylesheet" />
    <link href="/template/default/recouse/css/confirm.css?v=111" rel="stylesheet" />
    <script type="text/javascript" src="https://static.9hive.cn/global/vendor/jquery/jquery-2.1.4.min.js"></script>
    <script type="text/javascript" src="https://static.9hive.cn/global/vendor/layer/layer.js"></script>
    <!--弹窗样式-->
    <script type="text/javascript" src="/template/default/js/jquery.form.js"></script>
    <script type="text/javascript" src="/template/default/js/jquery.min.js"></script>
    <script type="text/javascript" src="/template/default/js/tooltips.js"></script>


    <style>
        body{padding-bottom:55px}

        .label_radio input {
            margin-right: 5px;
        }

        .has-js .label_radio {
            padding-left: 26px;
        }

        .has-js .label_radio {
            background-position: 0 0;
            background: url(/template/default/recouse/images/radio_none.png) no-repeat;
            background-size: 16px 16px;
        }
        .has-js label.r_on {
            background-position: 0 0px;
            background: url(/template/default/recouse/images/radio_check.png) no-repeat;
            background-size: 16px 16px;
        }
        .has-js .label_radio input {
            position: absolute;
            left: -9999px;
        }

        .btn-danger {
            color: #ffffff;
            background-color: #d9534f;
            border-color: #d43f3a;
        }

        .btn {
            display: inline-block;
            padding: 6px 12px;
            margin-bottom: 0;
            font-size: 14px;
            font-weight: normal;
            line-height: 1.428571429;
            text-align: center;
            white-space: nowrap;
            vertical-align: middle;
            cursor: pointer;
            background-image: none;
            border: 1px solid transparent;
            border-radius: 4px;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            -o-user-select: none;
            user-select: none;
        }
		.money_text{
			font-size: 1.0rem;
            text-indent: 1px;
		}
		.infobox{
			border-bottom: 1px solid #ddd;
		}
    </style>

</head>

<body style="min-width: 320px;max-width: 640px;margin:0 auto;background-color: white">
<header>
    <div class="tab_nav">
        <div class="header">
            <div class="h-left"><a class="sb-back" href="javascript:history.back(-1)" title="返回"><img src="/template/default/images/arrow_left_white.png"/></a></div>
            <div class="h-mid">用户反馈</div>
        </div>
    </div>
</header>
<form id="orderInfoForm" name="input"  action="/b/feedback/save" method="post" onsubmit=" return check()">
    <section class="accounts">
        <div class="coin">
            <input type="text" value="" class="money_text" id="name" placeholder="请输入您的姓名"/>
        </div>
        <div class="coin">
            <input type="text" value="" class="money_text" id="phone" placeholder="请输入您的联系方式"/>
        </div>
        <div class="coin">
            <textarea rows="5" id="content" placeholder="告诉我们您在使用中遇到的问题或者您宝贵的建议!" style="width: 100%;border: 1px solid #ddd;"></textarea>
        </div>
        <li><input id="submitBtn" value="提交" class="money_buttom" readonly/></li>
        <%if(isNotEmpty(loginMember)){%>
            <li><a href="/b/feedback/record?shopId=${shopId!}" class="money_buttom" readonly style="background-color: #dddddd;color: #0a0a0a">反馈记录</a></li>
        <%}%>

    </section>
</form>

<script src="/template/default/recouse/js/zepto.min.js" type="text/javascript"></script>
</body>
<script type="text/javascript">
    var testphone = /^0?(13[0-9]|15[0-9]|17[0-9]|18[0-9]|14[57])[0-9]{8}$/;
    $("#submitBtn").click(function () {
        var content=$("#content").val();
        var name=$("#name").val();
        var phone=$("#phone").val();
        if(!content){
            layer.msg('告诉我们您在使用中遇到的问题或者您宝贵的建议哦!');
            return;
        }
        $.ajax({
            url: "/b/feedback/save",
            type: 'GET',
            data:{
                "content":content,
                "name":name,
                "phone":phone,
                "shopId":"${shopId}",
            },
            success: function(data){
                if(data.code == 1){
                    //注册错误
                    layer.msg(data.desc);
                }else if (data.code == 0){
                    layer.msg("提交成功,感谢您的反馈!");
                    history.back(-1);

                }
            }});
    });

</script>
</html>